package architect.design.patterns.creation.singleton;

/**
 * 延迟初始化单例(线程不安全)
 *
 * @author guanxin
 * @date 2018/5/4 11:05
 */

public class LazySingleton {

    private static LazySingleton INSTANCE;

    private LazySingleton() {}

    public static LazySingleton getInstance(){
        if(INSTANCE == null){
            INSTANCE = new LazySingleton();
        }
        return INSTANCE;
    }
}
